<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>Yano Template Test</title>
<style type="text/css" media="screen">
/* <![CDATA[ */
    body {font-family: arial, helvetica; padding:0 1em}
    th {text-align: left}
    th, td {padding: 5px}
    .tpl, .php {border-left:1px solid #ccc}
    td.tpl, td.php {font-family: monospace}
/* ]]> */
</style>
</head>
<body>

<h1>Hello <?php echo isset($this->name) ? $this->escape($this->name) : 'world'; ?>!</h1>
<p>
    <form action="<?php echo $this->url(); ?>" method="post">
    <label for="name">Enter your name: </label><input type="text" name="name" id="name" />
    <input type="submit" /><br />
    <small>Try entering HTML tags</small>
    </form>
</p>
<hr />
<?php $paths = $this->getScriptPaths(); ?>
<?php $script = str_replace(array('\\', '/'), '/', $paths[0] . 'test/tpltest.phtml'); ?>
<?php $viewPath = substr($paths[0], 0, strrpos($paths[0], DIRECTORY_SEPARATOR, -2)); ?>
<?php $template = str_replace(array('\\', '/'), '/', $viewPath . '/templates/test/tpltest.phtml'); ?>
<p>
This page was generated by the template compiler. This will not be recompiled unless
you delete <tt><?php echo $this->escape($script); ?></tt> or edit <tt><?php echo $this->escape($template); ?></tt>.
</p>
<p>
Last compiled on: <em><?php echo date('r', filemtime($script)); ?></em>
</p>
<h2>Compile tests:</h2>
<?php $compiler = new Yano_Template_Engine(); ?>
<table cellspacing="0">
    <tr>
        <th>Replacement Type</th>
        <th class="tpl">Template Code</th>
        <th class="php">PHP Code Output</th>
    </tr>
<?php foreach ($this->examples as $desc => $code) : ?>
    <tr>
        <td><?php echo $this->escape($desc); ?></td>
        <td class="tpl"><?php echo $this->escape(nl2br($code)); ?></td>
        <td class="php"><?php echo $this->escape(nl2br($compiler->compile($code))); ?></td>
    </tr>
<?php endforeach; ?>
</table>

</body>
<html>